﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
public class CPostEffectsBase : MonoBehaviour
{
	protected Material CheckShaderAndCreateMaterial(Shader shader)
	{
		if (shader == null)
		{
			return null;
		}
		else if (!shader.isSupported)
		{
			return null;
		}
		else
		{
			Material material = new Material(shader);
			material.hideFlags = HideFlags.DontSave;
			if (material)
				return material;
			else
				return null;
		}
	}
}